package com.mt.roll.wms.controller;

import com.mt.roll.core.base.BaseController;
import com.mt.roll.core.constants.CommonConstant;
import com.mt.roll.core.validator.groups.PageGroup;
import com.mt.roll.core.vo.PageVo;
import com.mt.roll.core.vo.R;
import com.mt.roll.wms.params.WmsToWcsQueryParam;
import com.mt.roll.wms.service.WmsToWcsService;
import com.mt.roll.wms.vo.WmsToWcsVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.groups.Default;

@RestController
@RequestMapping(CommonConstant.API_MODULE_WMS + "wms/to/wcs")
@Slf4j
@Api(value = "WmsToWcs信息", tags = "WmsToWcs信息", hidden = false)
public class WmsToWcsController extends BaseController {

    @Autowired
    private WmsToWcsService wmsToWcsService;

    @PostMapping(value = "page")
    @ApiOperation(value = "获取分页WmsToWcs信息")
    private R<PageVo<WmsToWcsVo>> page(@Validated({PageGroup.class, Default.class}) @RequestBody WmsToWcsQueryParam wmsToWcsQueryParam) {
        return wmsToWcsService.page(wmsToWcsQueryParam);
    }
}
